Skip to main content

siderust-cpp

Active

Header-only C++17 wrapper for Siderust: ephemerides, coordinates, sky events, and observatory helpers.

2 stars
1 forks
C++
AGPL-3.0
Updated today

Why it exists

siderust-cpp is the C++ entry point to the Siderust stack. It wraps the Rust FFI layer in ordinary C++ value types so time, coordinates, bodies, and event searches feel natural on the C++ side.

Key Features

  • VSOP87 & ELP2000 ephemeris (Sun, Moon, planets)
  • Typed coordinate systems (geodetic, spherical, Cartesian)
  • Sun/Moon/Star altitude, crossings, and culminations
  • Built-in named observatories (Paranal, Mauna Kea, …)
  • CMake integration with automatic Rust FFI build

Getting Started

// CMakeLists.txt
find_package(siderust_cpp REQUIRED)
target_link_libraries(myapp PRIVATE siderust::siderust_cpp)

// main.cpp
#include <siderust/siderust.hpp>
using namespace siderust;

auto obs = ROQUE_DE_LOS_MUCHACHOS;
auto jd  = JulianDate::from_utc({2026, 7, 15, 22, 0, 0});
auto alt = sun::altitude_at(obs, MJD::from_jd(jd));

Contributing

We welcome contributions! Here's how you can help:

  • 1 Fork the repository and create your branch from main
  • 2 Make your changes and add tests if applicable
  • 3 Ensure all tests pass with cargo test
  • 4 Submit a pull request with a clear description

License

This project is licensed under the AGPL-3.0 license. See the LICENSE file for details.

Latest Release

v0.6.0 Jun 3, 2026
View release notes

Tags

cpp c++17 astronomy ffi bindings